//sequence
#include <stdio.h>
using namespace std;
typedef long long ll;

const int N = 3e6 + 10;
const ll P = 998244353;
int n, m, q, k, a, b;
ll fac[N], inv[N];

ll qp(ll x, ll y){
	ll ans = 1;
	while(y){
		if(y & 1){
			ans = ans * x % P;
		}
		x = x * x % P;
		y >>= 1;
	}
	return ans;
}
ll C(int n, int m){
	return fac[n] * inv[m] % P * inv[n-m] % P;
}

int main(){
	freopen("sequence.in", "r", stdin);
	freopen("sequence.out", "w", stdout);
	scanf("%d%d%d%d", &n, &m, &q, &k);
	if(q < m){
		puts("0");
		return 0;
	}
	fac[0] = 1;
	for(int i = 1; i <= m; ++ i){
		fac[i] = fac[i-1] * i % P;
	}
	inv[m] = qp(fac[m], P-2);
	for(int i = m - 1; i >= 0; -- i){
		inv[i] = inv[i+1] * (i+1) % P;
	}
	ll ans = 0;
	for(int i = 0; i <= m; ++ i){
		ll sgn = ((m-i) % 2 == 0 ? 1 : P-1);
		ans = (ans + sgn * C(m, i) % P * qp(n-m+i, q)) % P;
	}
	printf("%lld\n", ans * qp(k, q-m) % P * (n-m+1) % P);
	return 0;
}